//package com.example.strategy.strategy2.rule.impl;
//
//import com.example.strategy.strategy2.pojo.NationalityRuleDto;
//import com.example.strategy.strategy2.pojo.RuleDto;
//import com.example.strategy.strategy2.rule.AbstractRule;
//
//public class NationalityRule extends AbstractRule {
//
//    @Override
//    protected <T> T convert(RuleDto dto) {
//        NationalityRuleDto nationalityRuleDto = new NationalityRuleDto();
//        if (dto.getAddress().startsWith("MATCH_ADDRESS_START")) {
//            nationalityRuleDto.setNationality("MATCH_NATIONALITY_START");
//        }
//        return (T) nationalityRuleDto;
//    }
//
//
//    @Override
//    protected <T> boolean executeRule(T t) {
//        System.out.println("NationalityRule invoke!");
//        NationalityRuleDto nationalityRuleDto = (NationalityRuleDto) t;
//        if (nationalityRuleDto.getNationality().startsWith("MATCH_NATIONALITY_START")) {
//            return true;
//        }
//        return false;
//    }
//}